package com.wordplat.quickstart.xutils.http.app;

import com.wordplat.quickstart.xutils.http.RequestParams;
import com.wordplat.quickstart.xutils.http.annotation.HttpRequest;

import javax.net.ssl.SSLSocketFactory;

/**
 * Created by wyouflf on 15/8/20.
 * <p>
 *
 * @since 2021-05-09
 */
public interface ParamsBuilder {
    /**
     * buildUri
     *
     * @param params
     * @param httpRequest
     * @return String
     * @throws Throwable
     */
    String buildUri(RequestParams params, HttpRequest httpRequest) throws Throwable;

    /**
     * buildCacheKey
     *
     * @param params
     * @param cacheKeys
     * @return String
     */
    String buildCacheKey(RequestParams params, String[] cacheKeys);

    /**
     * getSSLSocketFactory
     *
     * @return SSLSocketFactory
     * @throws Throwable
     */
    SSLSocketFactory getSSLSocketFactory() throws Throwable;

    /**
     * buildParams
     *
     * @param params
     * @throws Throwable
     */
    void buildParams(RequestParams params) throws Throwable;

    /**
     * buildSign
     *
     * @param params
     * @param signs
     * @throws Throwable
     */
    void buildSign(RequestParams params, String[] signs) throws Throwable;
}
